<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D模型测试</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        body {
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #001c3a 0%, #003366 100%);
            color: white;
            font-family: Arial, sans-serif;
        }

        .test-container {
            width: 100%;
            height: 500px;
            background: rgba(0,28,58,0.3);
            border-radius: 8px;
            position: relative;
            overflow: hidden;
        }

        .farm-3d-model {
            width: 100%;
            height: 100%;
            position: relative;
            perspective: 1000px;
            transform-style: preserve-3d;
        }

        .sky {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 60%;
            background: linear-gradient(to bottom, #87CEEB, #4682B4);
            border-radius: 8px 8px 0 0;
        }

        .ground {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 40%;
            background: linear-gradient(to top, #8FBC8F, #556B2F);
            border-radius: 0 0 8px 8px;
        }

        .greenhouse {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotateY(-15deg) rotateX(10deg);
            width: 200px;
            height: 120px;
            transform-style: preserve-3d;
        }

        .greenhouse-roof {
            position: absolute;
            top: -20px;
            left: 0;
            width: 100%;
            height: 40px;
            background: linear-gradient(45deg, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
            clip-path: polygon(0 100%, 50% 0, 100% 100%);
            transform: rotateX(-30deg);
        }

        .greenhouse-wall {
            position: absolute;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.3);
        }

        .greenhouse-wall.front {
            width: 200px;
            height: 120px;
            transform: translateZ(0);
        }

        .greenhouse-wall.back {
            width: 200px;
            height: 120px;
            transform: translateZ(-100px) rotateY(180deg);
        }

        .greenhouse-wall.left {
            width: 100px;
            height: 120px;
            transform: translateX(-50px) rotateY(-90deg);
        }

        .greenhouse-wall.right {
            width: 100px;
            height: 120px;
            transform: translateX(50px) rotateY(90deg);
        }

        .plants {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: 100%;
        }

        .plant {
            position: absolute;
            width: 20px;
            height: 30px;
            background: linear-gradient(to top, #228B22, #32CD32);
            border-radius: 50% 50% 0 0;
            animation: grow 3s ease-in-out infinite;
        }

        .plant-1 { top: 20%; left: 20%; animation-delay: 0s; }
        .plant-2 { top: 30%; left: 40%; animation-delay: 0.5s; }
        .plant-3 { top: 25%; left: 60%; animation-delay: 1s; }
        .plant-4 { top: 60%; left: 25%; animation-delay: 1.5s; }
        .plant-5 { top: 70%; left: 45%; animation-delay: 2s; }
        .plant-6 { top: 65%; left: 65%; animation-delay: 2.5s; }

        @keyframes grow {
            0%, 100% { transform: scaleY(1); }
            50% { transform: scaleY(1.1); }
        }

        .equipment {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .fan {
            position: absolute;
            top: -80px;
            left: -100px;
            width: 30px;
            height: 30px;
            background: #4682B4;
            border-radius: 50%;
            animation: rotate 2s linear infinite;
        }

        .light {
            position: absolute;
            top: -60px;
            right: -80px;
            width: 25px;
            height: 25px;
            background: #FFD700;
            border-radius: 50%;
            box-shadow: 0 0 10px #FFD700;
            animation: glow 1.5s ease-in-out infinite;
        }

        .sensor {
            position: absolute;
            bottom: -40px;
            left: 50%;
            transform: translateX(-50%);
            width: 20px;
            height: 20px;
            background: #32CD32;
            border-radius: 50%;
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 10px #FFD700; }
            50% { box-shadow: 0 0 20px #FFD700, 0 0 30px #FFD700; }
        }

        @keyframes pulse {
            0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
            50% { transform: translateX(-50%) scale(1.2); opacity: 0.7; }
        }

        .model-info {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: rgba(0, 174, 255, 0.2);
            border: 1px solid rgba(0, 174, 255, 0.3);
            border-radius: 4px;
            color: white;
            font-size: 14px;
        }

        .info-item i {
            color: #00aeff;
        }

        .test-info {
            margin-top: 20px;
            padding: 20px;
            background: rgba(0,28,58,0.3);
            border-radius: 8px;
        }
    </style>
</head>
<body>
    <h1>3D农场模型测试</h1>
    
    <div class="test-container">
        <div class="farm-3d-model">
            <!-- 天空背景 -->
            <div class="sky"></div>
            
            <!-- 地面 -->
            <div class="ground"></div>
            
            <!-- 大棚建筑 -->
            <div class="greenhouse">
                <div class="greenhouse-roof"></div>
                <div class="greenhouse-wall front"></div>
                <div class="greenhouse-wall back"></div>
                <div class="greenhouse-wall left"></div>
                <div class="greenhouse-wall right"></div>
            </div>
            
            <!-- 植物 -->
            <div class="plants">
                <div class="plant plant-1"></div>
                <div class="plant plant-2"></div>
                <div class="plant plant-3"></div>
                <div class="plant plant-4"></div>
                <div class="plant plant-5"></div>
                <div class="plant plant-6"></div>
            </div>
            
            <!-- 设备 -->
            <div class="equipment">
                <div class="fan"></div>
                <div class="light"></div>
                <div class="sensor"></div>
            </div>
            
            <!-- 信息标签 -->
            <div class="model-info">
                <div class="info-item">
                    <i class="fas fa-thermometer-half"></i>
                    <span>28.5°C</span>
                </div>
                <div class="info-item">
                    <i class="fas fa-tint"></i>
                    <span>65%</span>
                </div>
                <div class="info-item">
                    <i class="fas fa-leaf"></i>
                    <span>健康</span>
                </div>
            </div>
        </div>
    </div>

    <div class="test-info">
        <h3>测试说明：</h3>
        <ul>
            <li>如果能看到蓝色天空和绿色地面，说明基础背景正常</li>
            <li>如果能看到透明的大棚建筑，说明3D变换正常</li>
            <li>如果能看到绿色的植物在生长，说明动画正常</li>
            <li>如果能看到旋转的风机、发光的灯、脉冲的传感器，说明设备动画正常</li>
            <li>如果能看到右上角的信息标签，说明UI元素正常</li>
        </ul>
    </div>

    <script>
        console.log('3D模型测试页面加载完成');
        console.log('检查元素是否存在：', {
            sky: !!document.querySelector('.sky'),
            ground: !!document.querySelector('.ground'),
            greenhouse: !!document.querySelector('.greenhouse'),
            plants: !!document.querySelector('.plants'),
            equipment: !!document.querySelector('.equipment'),
            info: !!document.querySelector('.model-info')
        });
    </script>
</body>
</html> 